23. Solution: Update Sunshine Layout

Update Sunshine Layout Solution

In this step, you modified some of the boiler plate code to create a new layout for Sunshine

Notes on Solution Code

Most of this step involved massaging the layout code to contain just a simple FrameLayout with a ScrollView, as seen below:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/tv_weather_data"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="16dp"
            android:textSize="20sp" />
    </ScrollView>
</FrameLayout>

After removing the ConstraintLayout from your code, it was also safe to remove this dependency:

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

Solution Code

Solution: [S01.01-Solution-CreateLayout][Diff]